Integrand size = 24, antiderivative size = 89 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {5 \sin (c+d x)}{7 a^2 d}-\frac {10 \sin ^3(c+d x)}{21 a^2 d}+\frac {\sin ^5(c+d x)}{7 a^2 d}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
5/7*sin(d*x+c)/a^2/d-10/21*sin(d*x+c)^3/a^2/d+1/7*sin(d*x+c)^5/a^2/d+2/7*I *cos(d*x+c)^5/d/(a^2+I*a^2*tan(d*x+c))
Time = 0.56 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.07 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {i \sec ^2(c+d x) (-140 \cos (c+d x)+42 \cos (3 (c+d x))+2 \cos (5 (c+d x))-70 i \sin (c+d x)+63 i \sin (3 (c+d x))+5 i \sin (5 (c+d x)))}{336 a^2 d (-i+\tan (c+d x))^2} \]
((I/336)*Sec[c + d*x]^2*(-140*Cos[c + d*x] + 42*Cos[3*(c + d*x)] + 2*Cos[5 *(c + d*x)] - (70*I)*Sin[c + d*x] + (63*I)*Sin[3*(c + d*x)] + (5*I)*Sin[5* (c + d*x)]))/(a^2*d*(-I + Tan[c + d*x])^2)
Time = 0.32 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3042, 3981, 3042, 3113, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^3 (a+i a \tan (c+d x))^2}dx\) |
\(\Big \downarrow \) 3981 |
\(\displaystyle \frac {5 \int \cos ^5(c+d x)dx}{7 a^2}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \int \sin \left (c+d x+\frac {\pi }{2}\right )^5dx}{7 a^2}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle -\frac {5 \int \left (\sin ^4(c+d x)-2 \sin ^2(c+d x)+1\right )d(-\sin (c+d x))}{7 a^2 d}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {5 \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{7 a^2 d}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\) |
(-5*(-Sin[c + d*x] + (2*Sin[c + d*x]^3)/3 - Sin[c + d*x]^5/5))/(7*a^2*d) + (((2*I)/7)*Cos[c + d*x]^5)/(d*(a^2 + I*a^2*Tan[c + d*x]))
3.2.28.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Simp[d^2*((m - 2)/(b^2*(m + 2*n))) Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[ {a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (IntegersQ[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]
Time = 0.71 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.15
method | result | size |
risch | \(\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{32 a^{2} d}+\frac {i {\mathrm e}^{-7 i \left (d x +c \right )}}{224 a^{2} d}+\frac {5 i \cos \left (d x +c \right )}{32 a^{2} d}+\frac {15 \sin \left (d x +c \right )}{32 a^{2} d}+\frac {3 i \cos \left (3 d x +3 c \right )}{32 a^{2} d}+\frac {11 \sin \left (3 d x +3 c \right )}{96 a^{2} d}\) | \(102\) |
derivativedivides | \(\frac {-\frac {i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {5 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {23 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {4}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {4}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {55}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {13}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{2} d}\) | \(174\) |
default | \(\frac {-\frac {i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {5 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {23 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {4}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {4}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {55}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {13}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{2} d}\) | \(174\) |
1/32*I/a^2/d*exp(-5*I*(d*x+c))+1/224*I/a^2/d*exp(-7*I*(d*x+c))+5/32*I/a^2/ d*cos(d*x+c)+15/32*sin(d*x+c)/a^2/d+3/32*I/a^2/d*cos(3*d*x+3*c)+11/96/a^2/ d*sin(3*d*x+3*c)
Time = 0.23 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.83 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {{\left (-7 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 105 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 21 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{672 \, a^{2} d} \]
1/672*(-7*I*e^(10*I*d*x + 10*I*c) - 105*I*e^(8*I*d*x + 8*I*c) + 210*I*e^(6 *I*d*x + 6*I*c) + 70*I*e^(4*I*d*x + 4*I*c) + 21*I*e^(2*I*d*x + 2*I*c) + 3* I)*e^(-7*I*d*x - 7*I*c)/(a^2*d)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (76) = 152\).
Time = 0.32 (sec) , antiderivative size = 231, normalized size of antiderivative = 2.60 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\begin {cases} \frac {\left (- 176160768 i a^{10} d^{5} e^{19 i c} e^{3 i d x} - 2642411520 i a^{10} d^{5} e^{17 i c} e^{i d x} + 5284823040 i a^{10} d^{5} e^{15 i c} e^{- i d x} + 1761607680 i a^{10} d^{5} e^{13 i c} e^{- 3 i d x} + 528482304 i a^{10} d^{5} e^{11 i c} e^{- 5 i d x} + 75497472 i a^{10} d^{5} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{16911433728 a^{12} d^{6}} & \text {for}\: a^{12} d^{6} e^{16 i c} \neq 0 \\\frac {x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 7 i c}}{32 a^{2}} & \text {otherwise} \end {cases} \]
Piecewise(((-176160768*I*a**10*d**5*exp(19*I*c)*exp(3*I*d*x) - 2642411520* I*a**10*d**5*exp(17*I*c)*exp(I*d*x) + 5284823040*I*a**10*d**5*exp(15*I*c)* exp(-I*d*x) + 1761607680*I*a**10*d**5*exp(13*I*c)*exp(-3*I*d*x) + 52848230 4*I*a**10*d**5*exp(11*I*c)*exp(-5*I*d*x) + 75497472*I*a**10*d**5*exp(9*I*c )*exp(-7*I*d*x))*exp(-16*I*c)/(16911433728*a**12*d**6), Ne(a**12*d**6*exp( 16*I*c), 0)), (x*(exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*c) + 10*exp(4*I* c) + 5*exp(2*I*c) + 1)*exp(-7*I*c)/(32*a**2), True))
Exception generated. \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.52 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.63 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {\frac {7 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{3}} + \frac {273 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1155 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2450 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2870 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2037 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 791 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 152}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{7}}}{168 \, d} \]
1/168*(7*(9*tan(1/2*d*x + 1/2*c)^2 + 15*I*tan(1/2*d*x + 1/2*c) - 8)/(a^2*( tan(1/2*d*x + 1/2*c) + I)^3) + (273*tan(1/2*d*x + 1/2*c)^6 - 1155*I*tan(1/ 2*d*x + 1/2*c)^5 - 2450*tan(1/2*d*x + 1/2*c)^4 + 2870*I*tan(1/2*d*x + 1/2* c)^3 + 2037*tan(1/2*d*x + 1/2*c)^2 - 791*I*tan(1/2*d*x + 1/2*c) - 152)/(a^ 2*(tan(1/2*d*x + 1/2*c) - I)^7))/d
Time = 7.59 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.81 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {\left (-21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,42{}\mathrm {i}+28\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,56{}\mathrm {i}+42\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,28{}\mathrm {i}+76\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,24{}\mathrm {i}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-6{}\mathrm {i}\right )\,2{}\mathrm {i}}{21\,a^2\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^3\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^7} \]
((3*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2)^2*24i + 76*tan(c/2 + (d*x)/2)^ 3 + tan(c/2 + (d*x)/2)^4*28i + 42*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2 )^6*56i + 28*tan(c/2 + (d*x)/2)^7 + tan(c/2 + (d*x)/2)^8*42i - 21*tan(c/2 + (d*x)/2)^9 - 6i)*2i)/(21*a^2*d*(tan(c/2 + (d*x)/2) + 1i)^3*(tan(c/2 + (d *x)/2)*1i + 1)^7)